<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>添加采购明细</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="../../layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../layui/layuiAdmin/css/admin.css" media="all">
</head>
<style>

</style>
<body>

<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-body" pad15>
                    <div class="layui-form" lay-filter="">
                        <div class="layui-form-item">
                          <label class="layui-form-label" style=align:"left";margin-left:32px;width:73px>药品类型
                            <div class="layui-input-inline" style="margin-left:-3px">
                              <select name="role" lay-verify="">
                                <option value="1" selected>中药</option>
                                <option value="2" abled>处方药</option>
                                <option value="3" abled>特效药</option>
                                <option value="4" abled>疫苗</option>
                              </select>
                            </div></label>


                        </div>
                        <div class="layui-form-item" id="er">
                            <div class="layui-input-inline">
                            </div>
                        </div>
                        <div class="layui-form-item">
                          <label class="layui-form-label" style=align:"left";margin-left:32px;width:73px>药品名称
                            <div class="layui-input-inline" style="margin-left:-3px">
                              <select name="role" lay-verify="">
                                <option value="1" selected>阿莫西林</option>
                                <option value="2" abled>阿司匹林</option>
                                <option value="3" abled>板蓝根</option>
                                <option value="4" abled>感冒冲剂</option>
                              </select>
                            </div></label>
                        </div>
                        <div style="margin-left: 55px">
                            <label class="layui-form-label" style="margin-left: -26px">
                                <p style="margin-left: 12px;width: 60px">采购数量</p>
                                <input style="width: 500px " type="text" name="nickname" value=""
                                       lay-verify="nickname" autocomplete="off"
                                       class="layui-input"></label>
                        </div>
                        <div class="layui-form-item">

                        </div>

                        <div style="margin-left: 55px">
                            <label class="layui-form-label" style="margin-left: -26px">
                                <p style="margin-left: -17px;width: 60px">备注</p>
                                <input style="width: 500px " type="text" name="nickname" value=""
                                       lay-verify="nickname" autocomplete="off"
                                       class="layui-input"></label>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <button class="layui-btn" lay-submit lay-filter="setmyinfo" >添加</button>
                        </div>
                    </div>
                </div>

            </div>
        </div>
    </div>
</div>
</div>

<script src="../../layui/layui.js">
    layui.use('form', function(){
        var form = layui.form;

        //监听提交
        form.on('submit(setmyinfo)', function(data){
            //这里的data对象包含了当前form表单的数据
            //你可以在这里添加你的添加逻辑，例如发送一个Ajax请求到后端服务器：
            $.ajax({
                url: '/your_server_endpoint', //替换为你的服务器端点
                type: 'POST',
                data: data.field, //将表单数据作为请求体发送
                success: function(response) {
                    //处理成功后的回调函数
                    console.log(response);
                },
                error: function(error) {
                    //处理错误时的回调函数
                    console.log(error);
                }
            });
            return false; //阻止表单跳转。如果需要表单跳转，去掉这段即可。
        });
    });
</script>
</body>
</html>